home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / basic / bptb11.zip / BPTB.DOC next >
Text File  |  1992-09-07  |  35KB  |  841 lines

  1.  
  2.  
  3.                            Basic Programmer's Toolbox
  4.                                (BPTB Version 1.0)
  5.                                Copyright (c) 1992
  6.  
  7.  
  8.  
  9.          The Basic Programmer's Toolbox is a collection of over 70 routines
  10.      and functions to help the Basic programmer bring their projects to
  11.      completion quickly and easily.  The files included on this disk should
  12.      include:
  13.  
  14.  
  15.      BPTB.DOC      Operations manual   (This file)
  16.  
  17.      QBXTLS.QLB    Quick Library for use with PDS 7.1
  18.      QBXTLS.LIB    LIB version for use with PDS 7.1
  19.      QBXTLS.INC    Include file for PDS 7.1
  20.  
  21.      QBTLS.QLB     Quick Library for QB 4.5
  22.      QBTLS.LIB     LIB version for use with QB 4.5
  23.      QBTLS.INC     Include file for QB 4.5
  24.  
  25.  
  26.          None of these files or this documentation may be copied or
  27.      distributed without the written permission from the author.  You are
  28.      free to use and distribute any program written using these routines
  29.      without any fee due only after completing the registration form, found
  30.      on the last page of this manual, and mailing it and the $25.00
  31.      registration fee to the author.  You will get a copy of the source
  32.      code for my program EZDOS with your registration.
  33.  
  34.          BPTB is written in both Basic and assembly.  I have elected to
  35.      write all of the routines in the Quick Library in Basic due to the
  36.      methods MS uses with certain internal functions and variables.  The
  37.      assembly version is only included in the linkable LIB library.  You
  38.      will note vast differences in performance using these routines within
  39.      the environment compared to use in the compiled version of your
  40.      program.
  41.  
  42.          The .LIB and .QLB files selected must be copied into the directory
  43.      listed under libraries in the "PATH" selection from the Quick Basic or
  44.      PDS menus.  The .INC file should be copied into the directory listed
  45.      for include files under the same menu selection.  Starting Quick Basic
  46.      or PDS with the "/L" switch will load the Basic Programmer's Toolbox
  47.      into your programming environment. ("QBX /L QBXTLS" or "QB /L QBTLS")
  48.  
  49.          The first line of your program should use the DEFINT command to
  50.      set the default variable type to INTEGER and then use the $INCLUDE
  51.      metacommand to properly declare all of the routines in the library.
  52.      See your QB 4.5 or PDS 7.1 documentation for more on these commands.
  53.      ( DEFINT A-Z )
  54.      ( REM $INCLUDE: 'QBXTLS.INC' )
  55.  
  56.      Note:   All variables that are not explicitly declared are assumed to
  57.              be of the type INTEGER (%).
  58.  
  59.      Basic Programmer's Toolbox 1.0                     Page 1 of 14
  60.  
  61.  
  62.  
  63.                                Table Of Contents
  64.  
  65.  
  66.      Date / Time Routines
  67.                 CLOCK............ 3           DAYOFWEEK........ 5
  68.                 DATE2NUMBER...... 5           NUMBER2DATE...... 10
  69.  
  70.      Display Routines
  71.                 CENTER........... 3           LEFTSCROLL....... 8
  72.                 CLEARSAVEDSCREENS 3           PAGEUP........... 10
  73.                 COMMAS........... 4           PAGEDOWN......... 10
  74.                 CURRENTCHAR...... 5           RESTORESCREEN.... 11
  75.                 CURRENTCOLOR..... 5           RIGHTSCROLL...... 12
  76.                 FADED............ 6           SAVEDSCREENS..... 12
  77.                 FADEIN........... 6           SAVESCREEN....... 12
  78.                 FADEOUT.......... 6           SETSAVED......... 12
  79.                 FIRSTCAP......... 7           SHADOW........... 12
  80.                 GETCOLOR......... 8
  81.  
  82.      Disk Drive Routines
  83.                 CHECKDRIVE....... 3           FILEEXISTS....... 6
  84.                 COPYFILE......... 4           FILEINFO......... 7
  85.                 CURDIR........... 4           FILESEARCH....... 7
  86.                 CURDRIVE......... 5           FINDFIRSTFILE.... 7
  87.                 DISKCAPACITY..... 5           FINDNEXTFILE..... 7
  88.                 DISKSPACE........ 5           TREE............. 13
  89.                 DRIVEOKAY........ 6
  90.  
  91.      Keyboard Routines
  92.                 ALTPRESSED....... 3           FLUSHKEYBOARDBUFF 7
  93.                 CAPLOCKON ....... 3           KEYPRESSED....... 8
  94.                 CARLOCKOFF....... 3           NUMLOCKOFF....... 10
  95.                 CTRLPRESSED...... 4           NUMLOCKON........ 10
  96.  
  97.      Mouse Routines
  98.                 MOUSEBUTTON...... 9           MOUSEON.......... 9
  99.                 MOUSEHORZ........ 9           MOUSESHOW........ 10
  100.                 MOUSEINSTALLED... 9           MOUSEVERT........ 10
  101.                 MOUSEOFF......... 9
  102.  
  103.      System Routines
  104.                 CHECKREBOOT...... 3           RUNPROGRAM....... 12
  105.                 COPYMEM.......... 4           VIDEOMODE........ 13
  106.                 DOSVERSION....... 6           VIDEOPAGE........ 13
  107.                 NOREBOOT......... 10          VIDEOSEGMENT..... 14
  108.                 REBOOT........... 11
  109.  
  110.      User Interface Routines
  111.                 CLOSEWINDOW...... 4           PASSWORD......... 11
  112.                 GETINPUT......... 8           PICKWINDOW....... 11
  113.                 INPUTBOX......... 8           PULLDOWN......... 11
  114.                 MENUBAR.......... 9           USERCHOICE....... 13
  115.                 MSGWINDOW........ 10          WINDOWCOLOR...... 14
  116.  
  117.  
  118.  
  119.      Basic Programmer's Toolbox 1.0                     Page 2 of 14
  120.  
  121.  
  122.  
  123.      ALTPRESSED             DECLARE FUNCTION altpressed% ()
  124.  
  125.           Parameters:  None.
  126.           Returns:     -1 if alt key is pressed.
  127.                         0 if alt key is not pressed.
  128.           Description: Returns the status of the keyboard's alt key at the
  129.                        time the function is called.
  130.  
  131.      CAPLOCKOFF             DECLARE SUB caplockoff ()
  132.      CAPLOCKON              DECLARE SUB caplockon ()
  133.  
  134.           Parameters:  None.
  135.           Returns:     None.
  136.           Description: These routines force the Caps Lock on or off.
  137.  
  138.      CENTER                 DECLARE SUB center (word$)
  139.  
  140.           Parameters:  word$ = string to be printed.
  141.           Returns:     None.
  142.           Description: This routine will print the string passed in word$
  143.                        centered equally right and left of the current
  144.                        cursor location.
  145.  
  146.      CHECKDRIVE             DECLARE FUNCTION checkdrive% (drive$)
  147.  
  148.           Parameters:  drive$ = letter of drive to check. ("" for default)
  149.           Returns:     0 if drive is ready for I/O.
  150.                        DOS error code if drive is not ready for I/O.
  151.           Description: Allows the programmer to check if a drive is ready
  152.                        for I/O to avoid an unwanted DOS error.
  153.  
  154.      CHECKREBOOT            DECLARE FUNCTION checkreboot% ()
  155.  
  156.           Parameters:  None.
  157.           Returns:     -1 if ALT-CTRL-DEL is disabled using noreboot.
  158.                         0 if ALT-CTRL-DEL is not disabled.
  159.           Description: Will allow the programmer to know if the noreboot
  160.                        routine has been called to disable the reboot
  161.                        interrupt. (See noreboot routine)
  162.  
  163.      CLEARSAVEDSCREENS      DECLARE SUB clearsavedscreens ()
  164.  
  165.           Parameters:  None.
  166.           Returns:     None.
  167.           Description: Resets the internal counter on the number of screens
  168.                        saved using the savescreen routine.
  169.  
  170.      CLOCK                  DECLARE FUNCTION clock$ ()
  171.  
  172.           Parameters:  None.
  173.           Returns:     The current system time
  174.           Description: Will return the current system time in standard time
  175.                        display format (11:37 AM).
  176.  
  177.  
  178.  
  179.      Basic Programmer's Toolbox 1.0                     Page 3 of 14
  180.  
  181.  
  182.  
  183.      CLOSEWINDOW            DECLARE SUB closewindow ()
  184.  
  185.           Parameters:  None.
  186.           Returns:     None.
  187.           Description: closes a message window created with the msgwindow
  188.                        routine.
  189.  
  190.      COMMAS                 DECLARE FUNCTION commas$ (number#, places%)
  191.  
  192.           Parameters:  Number# = number to format.
  193.                        places% = number of decimal pla